
#include <BNotice>
#include "member_BNotice.h"

using namespace BWE;

#define member						(*(member_BNotice*)_ptr)
#define member_allocate()			_ptr = new member_BNotice
#define member_release()			delete (member_BNotice*)_ptr

BNotice::BNotice(BNode* node, Notice type)
{
	member_allocate();
	member.node = node;
	member.type = type;
}
BNotice::BNotice(BNode* node, Notice type, const BRefer& value)
{
	member_allocate();
	member.node = node;
	member.type = type;
	member.value = value;
}
BNotice::BNotice(const BNotice& other)
{
	member_allocate();
	member.time = notice_member(&other)->time;
	member.type = notice_member(&other)->type;
	member.node = notice_member(&other)->node;
	member.value = notice_member(&other)->value;
}
BNotice::~BNotice()
{
	member_release();
}

void BNotice::setNode(BNode* node)
{
	member.node = node;
}
BNode* BNotice::node() const
{
	return member.node;
}

void BNotice::setType(Notice type)
{
	member.type = type;
}
Notice BNotice::type() const
{
	return member.type;
}

void BNotice::setTime(double time)
{
	member.time = time;
}
double BNotice::time() const
{
	return member.time;
}

void BNotice::setValue(const BRefer& value)
{
	member.value = value;
}
const BRefer& BNotice::value() const
{
	return member.value;
}


